import { IFeidaoAiBrowserComponent } from '@feidao/web/interfaces';
import nodejs from '@feidao/web/atom/browser/msg/nodejs';

export default async function a007(fd: IFeidaoAiBrowserComponent, ...args: any[]) {
	// 设置默认
	const target_node = args[0].target;
	const exam_id = target_node.getAttribute('data-feidao-id');
	const res = await nodejs(fd.data.spaceid, 'exam_upd_def', { exam_id });
	if (res === 'success') {
		alert('设置默认成功');
		window.location.reload();
	} else {
		alert('设置默认失败');
	}
}
